import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

// 引入tabbar的路由
const homeContainer = () =>import('../components/tabBar/homeContainer.vue')
const memberContainer = () =>import('../components/tabBar/memberContainer.vue')
const shopcarContainer = () =>import('../components/tabBar/shopcarContainer.vue')
const searchContainer = () =>import('../components/tabBar/searchContainer.vue')
const newsList = () =>import('../components/news/newsList.vue')
const newsInfo = () =>import('../components/news/newsInfo.vue')
const photoList = () =>import('../components/photo/photoList.vue')
const photoInfo = () =>import('../components/photo/photoinfo.vue')
const goodsList = () =>import('../components/goods/goodsList.vue')
const goodsInfo = () =>import('../components/goods/goodsInfo.vue')
const goodsDec = () =>import('../components/goods/goodsDec.vue')
const goodsComment = () =>import('../components/goods/goodsComment.vue')

export default new Router({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:homeContainer},
    {path:'/member',component:memberContainer},
    {path:'/shopcar',component:shopcarContainer},
    {path:'/search',component:searchContainer},
    {path:'/home/newsList',component:newsList},
    {path:'/home/newsInfo/:id',component:newsInfo},
    {path:'/home/photoList',component:photoList},
    {path:'/home/photoList',component:photoList},
    {path:'/home/photoinfo/:id',component:photoInfo},
    {path:'/home/goodslist',component:goodsList},
    {path:'/home/goodsinfo/:id',component:goodsInfo},
    {path:'/goods/goodsdec/:id',component:goodsDec},
    {path:'/goods/goodscomment/',component:goodsComment,name:'goodsComment'}
  ],
  linkActiveClass:'mui-active'
})
